package com.kuang.service;

import com.kuang.springcloud.pojo.Userinfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserService {
/**
 * @description：TODO

 * @author     ：LK
 * @date       ：Created in 2021-10-26 15:06
 */
//@Autowired
//public Userinfo userinfo;
//    @Select("select * from userinfo")
List<Userinfo> findAll();

    //    @Select("select * from userinfo where username=#{username}")
    Userinfo getuserByUsername(String username);

    //    @Update("update userinfo set role=#{role},password=#{password},province=#{province},organization=#{organization},mail=#{mail},telephone=#{telephone},orgtel=#{orgtel},contacts=#{contacts},address=#{address},realname=#{realname}  where username=#{username}")
    public int updateWhole(Userinfo user);

    //添加钻孔波速测试记录表
//    @Insert("insert into userinfo(username,password,role,province,organization,mail,telephone,orgtel,contacts,address,realname) values(#{username},#{password},#{role},#{province},#{organization},#{mail},#{telephone},#{orgtel},#{contacts},#{address},#{realname})")
    public int adduser(Userinfo user);


//    以下为测试redis 的操作

    Userinfo getuserByUsernameRedis(String username);
    //    以下为测试redis 的操作
}
